package com.yunhe.spring;

import java.lang.reflect.Method;
import java.util.Arrays;

import org.springframework.aop.MethodBeforeAdvice;

public class MethodBeforeAdviceImpl implements MethodBeforeAdvice{
	/**
	 * 方法前执行拦截器
	 * */
	@Override
	public void before(Method method, Object[] args, Object obj)
			throws Throwable {
		System.out.println("运行前检查.......");
		//输出方法名
		System.out.println("Method:"+method.getName());
		//输出方法参数
		System.out.println("Args:"+Arrays.asList(args));
		//输出对象
		System.out.println("Object:"+obj);
		
	}
	
}
